package com.saybiu.utils;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

/**
 *  工具类使用请自行添加，并写好注释！
 */
public class Utils {
    public static String toDate(Date date) {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(date);
    }
    public static String pictureDate(Date date) {
        return new SimpleDateFormat("yyyyMMddHHmmss").format(date);
    }
    public static String creatRandom()
    {
        Random random=new Random();


        StringBuffer stringBuffer=new StringBuffer();
        for(int x=0;x<8;x++)
        {
            int i = random.nextInt(10);
            stringBuffer.append(i);
        }
        return stringBuffer.toString();


    }
}
